import request from '@/utils/request'

// 获取所有用户数据
export const getUsers = (params) => {
  return request({
    method: 'GET',
    url: '/getUsers',
    params
  })
}

// 查找特定用户的数据
export const queryUser = (params) => {
  return request({
    method: 'GET',
    url: '/queryUser',
    params
  })
}

// 封禁用户
export const banUser = (data) => {
  return request({
    method: 'POST',
    url: '/banUser',
    data
  })
}

// 新建用户提交表单
export const addUser = (data) => {
  return request({
    method: 'POST',
    url: '/addUser',
    data
  })
}

// 编辑前获取用户信息
export const getEditUser = (params) => {
  return request({
    method: 'GET',
    url: '/getEditUser',
    params
  })
}

// 编辑用户
export const editUser = (data) => {
  return request({
    method: 'POST',
    url: '/editUser',
    data
  })
}
